
//
//  MBConentMoreCell.m
//  发布求租
//
//  Created by MB__Lee on 2018/6/7.
//  Copyright © 2018年 MB__Lee. All rights reserved.
//

#import "MBConentMoreCell.h"

@interface MBConentMoreCell()
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;

@property (weak, nonatomic) IBOutlet UIButton *moreBTN;

@property (weak, nonatomic) IBOutlet UILabel *redLabel;

@end

@implementation MBConentMoreCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.moreBTN.enabled = NO;
    // Initialization code
}
-(void)setCMModel:(MBCommonCellModel *)CMModel{
    [super setCMModel:CMModel];
    
    //1. 是否隐藏 *
    if (CMModel.hasX) {
        self.redLabel.hidden = NO;
    }else{
        self.redLabel.hidden = YES;
    }
    //2.标题
    self.nameLabel.text = CMModel.title;
    
//    3.显示 “未选择” 按钮样式
    if (CMModel.xuanze.length) {
        [self.moreBTN setTitle:CMModel.xuanze forState:UIControlStateNormal];
         [self.moreBTN setTitleColor:MB_mainColor forState:UIControlStateNormal];
    }else{
        
        [self.moreBTN setTitle:CMModel.PHTest forState:UIControlStateNormal];
    }
    
    
   
}
//-(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event{
//
//    return  self;
//}
-(void)changeStateASSelected{
    
    
    [self.moreBTN setTitle:@"已选择" forState:UIControlStateNormal];
    [self.moreBTN setTitleColor:MB_mainColor forState:UIControlStateNormal];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
